<?php 
	include_once("../model/Model.php");
	$model = new Model();
	//session_start();
	$city = "";
	$gender = "";
	$dob = "";
	if(isset($_SESSION['city']) && isset($_SESSION['dob']) && isset($_SESSION['gender']))
	{
		header("Location:dashboard.php");
	}
	elseif(isset($_SESSION['city']))
	{
		$city = $_SESSION['city'];
	}
	elseif(isset($_SESSION['dob']))
	{
		$dob = $_SESSION['dob'];
	}
	elseif(isset($_SESSION['gender']))
	{
		$gender = $_SESSION['gender'];
	}


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mandatory Page</title>    
<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/script.js"></script>


</head>

<body>

	<form method="post" name="mandatory" >
	City : <input type="text" id="city" name="city" value="<?php echo $city; ?>"  >
    DOB : <input type="text" id="dob" name="dob" value="<?php echo $dob; ?>" >
    Gender : <select id="gender" name="gender">
    <?php if($gender == "male") 
	{ 
	?>
    	<option value="male" selected>Male</option>
        <option value="female">Female</option>
    <?php 
	} 
	else 
	{
	?>
	    <option value="male" >Male</option>
        <option value="female" selected="selected">Female</option>>Female</option>
    <?php
	}
	?>    
       
    </select>
    <input type="submit" value="submit" onclick="submitMandatoryData();return false;">
    </form>
    
    <div id="dataError"></div>
</body>
</html>